package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@RequestMapping("/say")
public class TestController {
    @RequestMapping("/say")
    public String say(){
        return "Hi，SpringBoot";
    }

//    @RequestMapping("/say2")
//    public String say2(){
//        return "Hi，SpringBoot2";
//    }

    @GetMapping("/say2")
    public String say2(){
        return "Hi，SpringBoot";
    }

//    @PostMapping("/say3")
//    public String say3(){
//        return "Hi，SpringBoot";
//    }

    @RequestMapping("getname")
    public String getname(String name){
        return "name:" + name;
    }
}
